<template>
	<view class="bg">
		<!-- 轮播和九宫格 -->
		<view >
			<homeTop type="home"></homeTop>
		</view>
		<!-- 猜你喜欢 -->
		<youLike></youLike>
	</view>
</template>

<script>
	import {
		mapState
	} from 'vuex';
	export default {
		data() {
			return {
			}
		},
		computed: {
			...mapState(['height'])
		},
		onLoad(options) {
			if(options.share_id) {
				uni.setStorageSync('share_id', options.share_id);
			}
		},
		components: {},
		onShow() {
			this.init();
		},
		onHide() {
		},
		methods: {
			init() {
			},
			toSpecial() {
				uni.navigateTo({
					url: '/pages/home/special-offer'
				})
			},
			toDetail(id) {
				console.log(id);
				uni.navigateTo({
					url: '/pages/home/store-detail?store_id=' + id
				})
			}
		}

	}
</script>

<style scoped lang="scss">
	.img {
		width: 100%;
		height: 180rpx;
		background-repeat: no-repeat;
		background-size: cover;
		border-radius: 10rpx 10rpx 0 0;
	}
</style>
